<template>

		<!-- 页面蒙层 -->
		<focus-box v-if="isAuth"
		width="750" :height="sys.screenHeight_rpx"
		mode="col" justify="center" align="center"
		position="fixed" left="0" top="0" index="5x" bg="rgba(0,0,0,0.5)">
			
			<!-- 未实名模态框 -->
			<focus-box
			width="600" :padding="[80,0,0,0]"
			mode="col" justify="start" align="center"
			bg="white" radius="20">
				
				<!-- 弹框标题 -->
				<focus-text size="42" color="black" weight="bold" text="实名认证"></focus-text>
				<!-- 间隔 -->
				<focus-box width="100" height="50"></focus-box>
				
				<!-- 弹框内容容器 -->
				<focus-box width="510" mode="col" justify="center" align="center">
					<!-- 内容文字 -->
					<text style="font-size:32rpx; line-height:55rpx; color:#353535; text-align:center;">您未实名认证，请先实名认证</text>
				</focus-box>
				<!-- 间隔 -->
				<focus-box width="100" height="60"></focus-box>
				
				<!-- 间隔线 -->
				<focus-line length="600" color="info-light"></focus-line>
				<!-- 按钮栏 -->
				<focus-box width="600" height="98" mode="row" justify="center">
					
					<!-- 取消登录按钮 -->
					<focus-box width="298" height="98" mode="row" justify="center" align="center"
					@click="onCancel">
						<focus-text size="32" color="#9D9D9D" text="暂不实名"></focus-text>
					</focus-box>
					
					<!-- 按钮中间的间隔线 -->
					<focus-line direction="col" length="98" color="info-light"></focus-line>
					
					<!-- 确定按钮 -->
					<button class="modal-login-btn-phone" open-type="getPhoneNumber"
					@click="onOk">立即实名</button>
					
				</focus-box>
				
			</focus-box>
		</focus-box>
	</view>
</template>

<script>
	export default {
		props: {
			isAuth: { type: Boolean, default: false },
		},
		data () {
			return {
				sys: {}
			}
		},
		// 实例挂载完毕
		mounted() {
			// 获取系统信息
			uni.$focus.systemInfo((sysD)=>{ this.sys = sysD; });
		},
		methods: {
			onCancel () {
				this.$emit('onClose');
				uni.switchTab({
					url: '/pages/tabbar/study/index'
				});
			},
			onOk () {
				this.$emit('onClose');
				uni.navigateTo({
					url: "/pages/realname/index"
				})
			}
		}
	}
</script>

<style>
	/* 获取用户手机号按钮 */
	.modal-login-btn-phone{
		width: 298rpx; height: 98rpx;
		font-size: 32rpx; color: #4A87FD;
		background: none; border: none; outline: none;
		display: flex; flex-direction: row; justify-content: center; align-items: center;
	}
	button::after{ border: none; }
</style>